package com.hzx.service.impl;

import com.hzx.dao.CommodityMapper;
import com.hzx.pojo.Commodity;
import com.hzx.service.CommodityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommodityServiceImpl implements CommodityService {

    @Autowired
    private  CommodityMapper commodityMapper;

    @Override
    public Commodity selectByid(Integer id) {
        return commodityMapper.selectByid(id);
    }


    @Override
    public  Integer deleteByPrimaryKey(Integer id) {
        return commodityMapper.deleteByPrimaryKey(id);
    }

    @Override
    public  Integer selectcommodityNum() {
        return commodityMapper.selectcommodityNum();
    }

    @Override
    public  Integer  selectCommodityTradeNum() {
        return  commodityMapper.selectCommodityTradeNum();
    }

    @Override
    public  Integer updateCommodityStatus(Integer id) {
        return  commodityMapper.updateCommodityStatus(id);
    }

}
